package com.yl.zqy.service.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yl.zqy.common.Result;
import com.yl.zqy.dto.SysRoleUserDTO;
import com.yl.zqy.entity.sys.SysUser;
import com.yl.zqy.vo.common.IPageVo;
import com.yl.zqy.vo.login.LoginVo;
import com.yl.zqy.vo.login.UserPwdVo;
import com.yl.zqy.vo.user.UserInstanceVo;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 系统用户 服务类
 * </p>
 *
 * @author liang.yu
 * @since 2024-03-24
 */
public interface SysUserService extends IService<SysUser> {
    SysUser getUserByLogin(LoginVo vo);

    Result<List<SysUser>> getUserOnline(int current, int size);

    Result<Boolean> insertUser(UserInstanceVo user);

    Result<Boolean> updateUser(UserInstanceVo user);

    Result<Boolean> deleteById(List<String> ids);

    Result<IPageVo<SysUser>> getUserByPage(int current, int size, String deptId, String status, String query);

    int getCountByDeptId(String deptId);

    List<SysRoleUserDTO> getUserNotAuthByRoleId(String roleId, String query);

    List<SysRoleUserDTO> getUserAuthByRoleId(String roleId, String query);

    SysRoleUserDTO getUserInfo(String userId);

    Result<Boolean> updatePwd(UserPwdVo vo);

    void exportDefaultUsers(HttpServletResponse response);

    Boolean uploadUsersRead(MultipartFile file);
}
